"use strict";
import {
    freezeConstant,
    getstemInfo
} from "../js/common";

let hostIp = "http://zadai.net:8000"; // 測試环境

let root = `/apis`;

var config = {
    sendSmsCheckCode: `/user/sendSmsCheckCode/::mobile`, // 发送短息
    checkMessageCode: `/user/checkMessageCode/::checkCode`, //验证验证码是否有效
    teamwork: `/user/teamwork`, //成为合伙人 
    userAdd: `/user/add`, //入驻资料提交  
    uploadImg: `/user/uploadImg`, //入驻资料图片提交

    consultantListById: `/consultant/listById/::id`, //查看顾问详情
    login: `/loginForApp/::checkMobile/::checkCode`, //实现登录注册

    knowType: `/know/showType`, //知识库类别
    knowList: `/know/list`, //知识库列表
    knowDetails: `/know/list/::id`, //知识详情页面 
    knowSwiper: `/know/showLunbo/::count`, //知识轮播图

    advisoryList: `/advisory/list`, //咨询展示

    getLoanType: `/loan/getLoanType`, //查询贷款种类
    getLoanAll: `/loan/get`, //获取所有贷款信息 
    getLoanDetails: `/loan/get/::id`, //贷款详情
    loanApply: `/loan/apply`, //贷款申请 
    listExpert: `/loan/listExpert`, //顾问列表
    consultantListAll: `/consultant/listAll`, //专家评论列表 
    advisoryCommentl: `/loan/advisoryComment`, //对专家进行评论
    mark: `/loan/mark/::id`, //对顾问进行关注
    getMarkLoan: `/loan/getMarkLoan`, //查看我的关注  

    //loanIntent:`/loan/loanIntent/:mobile/:loanType`,  //贷款快捷电话  
    loanIntent: `/loan/loanIntent`, //贷款快接电话
    advisoryList: `/advisory/list`, //我的咨询 s/advisory/record咨询前调用接口
    advisoryRecord: `/advisory/record`, //咨询电话记录

    area: `/consultant/area`, //地区展示  
    examineCheck: `/consultant/check`, //审核是否通过判断

    getUid: `/websocket/getUid`,
    onLineUsers: `/websocket/localExpert`, //线上列表
    uploadImgChat: `/user/uploadImgChat`, //图片上传
    getHistoryMessage: `/websocket/getHistoryMessage` //获取聊天历史记录

};

// 增加root

Object.keys(config).forEach(key => {
    // #ifdef H5
    config[key] = root + config[key]
        // #endif
        //#ifdef APP-PLUS || MP-WEIXIN
    config[key] = hostIp + root + config[key]
        // #endif

});
let API = freezeConstant(config)
export {
    API
}